package generic.interfaces;

import java.util.ArrayList;

import exceptions.PersistenceExceptionMessage;
import generic.dao.GenericDAO;

public interface GenericPersistence <PERSISTENCE extends GenericDAO<?, ?>, TYPE_ID, TYPE> {
	
	public PERSISTENCE DAOInstance() throws PersistenceExceptionMessage;;
	
	public TYPE find(TYPE_ID id) throws PersistenceExceptionMessage;;
	
	public void persist() throws PersistenceExceptionMessage;;
	
	public void remove() throws PersistenceExceptionMessage;;
	
	public TYPE merge() throws PersistenceExceptionMessage;
	
	public ArrayList<TYPE> findAll() throws PersistenceExceptionMessage;
	
}
